package org.example;

import Factory.FactoryOrderPattern;
import dao.OrderDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class AppFactoryDemo {
    public static void main(String[] args) {
       /* OrderDao orderDao = FactoryOrderPattern.createOrder();
        orderDao.save();*/
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");
        OrderDao orderDao = (OrderDao) ctx.getBean("orderDao");
        orderDao.save();
    }
}
